﻿<%@ Page Title="Manage Sites" Theme="WebAdmin" Language="C#" MasterPageFile="~/WebAdmin/WebAdmin.master" AutoEventWireup="true" CodeFile="ManageSites.aspx.cs" Inherits="WebAdmin_ManageSites" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div id="submenu">
        <div align="right" class="smallgraytext" style="padding: 9px;">
            <a href="AddSite.aspx">Create New Site</a>
        </div>
    </div>
    <div id="contenttext">
        <div style="padding: 0px 10px 10px 10px">
        
            <div style="text-align: left;">
                <h3 style="margin:0px;">
                    Site List</h3>
<asp:GridView ID="GVSites" Width="100%" AutoGenerateColumns="False" runat="server"
                                CssClass="GridViewStyle" AllowSorting="true" GridLines="None">
                                <Columns>
                                    <asp:BoundField DataField="Name" HeaderText="Name" />
                                    <asp:BoundField DataField="Description" HeaderText="Description" />
                                    <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderText="Select Site">
                                        <ItemTemplate>
                                            <a href="ManageSites.aspx?Type=CurrentSite&Id=<%#Eval("Id") %>" ><img alt="Layout" title="Layout" src="<%#IsSelectedSite(Convert.ToString(Eval("Id"))) %>"></img></a>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderText="Default Site">
                                        <ItemTemplate>
                                            <a href="ManageSites.aspx?Type=DefaultSite&Id=<%#Eval("Id") %>" ><img alt="Layout" title="Layout" src="<%#IsDefaultSite(Convert.ToString(Eval("Id"))) %>"></img></a>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderText="Edit">
                                        <ItemTemplate>
                                            <a href="AddSite.aspx?Id=<%#Eval("Id") %>"><img alt="Edit Site" title="Edit Site" src="../App_Themes/WebAdmin/buttons/page_white_edit.png"  width="24" height="24" ></img></a></ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderText="Delete">
                                        <ItemTemplate>
                                            <a onclick="return confirm('Are you sure want to delete this site?')" href="ManageSites.aspx?Type=Delete&Id=<%#Eval("Id") %>"><img alt="Delete site" title="Delete site" src="../App_Themes/WebAdmin/buttons/page_delete.png" width="24" height="24"  ></img></a></ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <RowStyle  CssClass="RowStyle" />
                                <EmptyDataRowStyle CssClass="EmptyRowStyle" />
                                <PagerStyle CssClass="PagerStyle" />
                                <SelectedRowStyle CssClass="SelectedRowStyle" />
                                <HeaderStyle CssClass="HeaderStyle" />
                                <EditRowStyle CssClass="EditRowStyle" />
                                <AlternatingRowStyle CssClass="AltRowStyle" />
                                <EmptyDataTemplate>No Sites</EmptyDataTemplate>
                            </asp:GridView>
            </div>
        </div>
    </div>
</asp:Content>

